import { Component, Input, OnInit } from '@angular/core';

@Component({
  selector: 'app-upload',
  templateUrl: './upload.component.html',
  styleUrls: ['./upload.component.scss'],
})
export class UploadComponent implements OnInit {
  @Input() canEdit: boolean;
  postImgUrl = '';
  getImgUrl = '';
  file = {
    form: {
      areaCode: 0, // this.$store.state.user.dataPowerCode,
      type: '0',
    },
    list: {},
    preview: {
      show: false,
      url: '',
    },
  };

  uploadLoading = false;
  currentTabName = '';

  data = [
    { extra: '0', id: '30', name: '中标通知书' },
    { extra: '1', id: '31', name: '物业服务合同扫描件' },
    { extra: '1', id: '33', name: '负责人证件图片' },
    { extra: '0', id: '34', name: '物业服务合同备案证明' },
    { extra: '', id: '32', name: '负责人培训经历证明' },
  ];

  constructor() {}

  ngOnInit(): void {
    this.file.form.type = this.data[0].id;
    this.currentTabName = this.data[0].name;
  }
}
